﻿using SWBetongXaydung.BLL;
using SWBetongXaydung.GUI.Common;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace SWBetongXaydung.GUI.TacNghiep
{
    public partial class FormDoiTaiXe : BaseDialog
    {
        public long IDTaiXe { get; set; }
        public FormDoiTaiXe(string soXe)
        {
            InitializeComponent();
            LoadTaiXe();
            txtSoXe.Text = soXe;
        }

        private void btnDongY_Click(object sender, EventArgs e)
        {
            this.DialogResult = System.Windows.Forms.DialogResult.OK;
            IDTaiXe = long.Parse(cmbTaiXe.SelectedValue.ToString());
        }
        void LoadTaiXe()
        {
            cmbTaiXe.DataSource = TaiXeBLL.GetList();
            cmbTaiXe.DisplayMember = "TenDayDu";
            cmbTaiXe.ValueMember = "IDTaiXe";
        }
    }
}
